package uem;

import com.db4o.Db4oEmbedded;
import com.db4o.ObjectContainer;

public class CreateDB4O {

	final static String BDPer = "./../db4o-8.0/DBPeople.yap";

	public static void main(String[] args) {
				
		ObjectContainer db = Db4oEmbedded.openFile(
				Db4oEmbedded.newConfiguration(), BDPer);
		// Create people
		Person p1 = new Person("Juan", "Guadalajara");
		Person p2 = new Person("Ana", "Madrid");
		Person p3 = new Person("Luis", "Granada");
		Person p4 = new Person("Pedro", "Asturias");		
		
		// Store objects Person in the data 
		db.store(p1);
		db.store(p2);
		db.store(p3);
		db.store(p4);
		
		db.close();
		
	} //end main
} // end ExampleDb4o
